using System;
using System.Collections.Generic;
using Microsoft.TeamFoundation.Client;

namespace TXLooker.Common.Core
{
    [Serializable]
    public class ServerStore
    {
        private TeamFoundationServer m_server;
        private List<ProjectStore> m_projects;

        public ServerStore()
        { }

        public ServerStore(TeamFoundationServer server,List<ProjectStore> projects):this()
        {
            this.m_server = server;
            this.m_projects = projects;
        }

        public List<ProjectStore> Projects
        {
            get { return this.m_projects; }
            set { this.m_projects = value; }
        }

        public TeamFoundationServer Server
        {
            get { return this.m_server; }
            set { this.m_server = value; }
        }

        public IEnumerator<ProjectStore> GetEnumerator()
        {
            foreach (ProjectStore project in this.m_projects)
                yield return project;
        }
    }
}
